<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>数据采集</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<script src="../fonts/iconfont.js"></script>
		<link rel="stylesheet" href="../css/mui.min.css">
		<style>
			html,
			body {
				background-color: #efeff4;
			}
			
			.title {
				margin: 20px 5px;
				color: #6d6d72;
				font-size: 18px;
			}
			
			.icon {
				/* 通过设置 font-size 来改变图标大小 */
				width: 3.5em;
				height: 3.5em;
				/* 图标和文字相邻时，垂直对齐 */
				vertical-align: -0.15em;
				/* 通过设置 color 来改变 SVG 的颜色/fill */
				fill: currentColor;
				/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
	             normalize.css 中也包含这行 */
				overflow: hidden;
				margin-top: 8px;
				color: #00af66
			}
			
			.diy_header {
				background: white;
				padding-bottom: 10px;
				border-bottom: 1px solid #cccccc;
				height: 100px;
				position: relative;
				margin-bottom: 20px;
			}
		</style>
	</head>

	<body>
		<div class="diy_header">

			<h3 style="margin: 0;padding: 0;position: absolute;bottom: 22px;padding-left: 3%;">数据采集</h3>
			<h4 id="local" style="color: #AEAEAE;margin: 0;padding: 0;position: absolute;bottom: 22px;right:0;padding-right:3%" onclick="openDtj()"></h4>
		</div>
		<div class="mui-content">
			<div style="position: relative;text-align: center;margin-bottom: 50px;">
				<svg class="icon" aria-hidden="true" onclick="checkUserAndOpenWin('fammerList.html')">
					<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-kuaidiyuan"></use>
				</svg>

				<h3 style="color: #666666;" onclick="checkUserAndOpenWin('fammerList.html')">入户调查</h3>
			</div>
			<div style="text-align: center;margin-bottom: 50px;" onclick="checkUserAndOpenWin('echartsProduceInfo.html')">
				<svg class="icon" aria-hidden="true">
					<use xlink:href="#icon-zhongzhi1"></use>
				</svg>
				<h3 style="color: #666666;">生产情况</h3>

			</div>

			<div style="text-align: center;" onclick="checkUserAndOpenWin('echartsReport.html')">
				<svg class="icon" aria-hidden="true">
					<use xlink:href="#icon-tiaocha"></use>
				</svg>
				<h3 style="color: #666666;">决策分析</h3>

			</div>
			<!--	<div class="model info-wrap">
				<a href="javascript:void(0)" onclick="openWin('fammerList.html')">
					<svg class="icon" aria-hidden="true">
						<use xlink:href="#icon-tiaocha"></use>
					</svg>
					<h3>入户调查</h3>
				</a>
				<a onclick="unSubmit()" href="javascript:void(0);" id="info" class="mui-icon mui-icon-info-filled mui-pull-right" style="color: red;"></a>
			</div>
			<div class="model">
				<a href="javascript:void(0)" onclick="openWin('echartsProduceInfo.html')">
					<svg class="icon" aria-hidden="true">
						<use xlink:href="#icon-zhongzhi1"></use>
					</svg>
					<h3>生产情况</h3></a>
			</div>

			<div class="model">
				<a href="javascript:void(0)" onclick="openWin('echartsReport.html')">
					<svg class="icon" aria-hidden="true">
						<use xlink:href="#icon-juece"></use>
					</svg>
					<h3>决策报告</h3></a>
			</div>
			<div class="model">
				<a>
					<svg class="icon" aria-hidden="true">
						<use xlink:href="#icon-duijie"></use>
					</svg>
					<h3>产销对接</h3></a>
			</div>-->
		</div>
	</body>
	<script src="../js/resource/mui.js"></script>
	<script src="../js/resource/vue.js"></script>
	<script src="../js/resource/axios.js"></script>
	<script src="../js/resource/config.js"></script>
	<script>
		mui.init({
			swipeBack: true //启用右滑关闭功能
		});

		db.transaction(function(tx) {
			tx.executeSql('CREATE TABLE IF NOT EXISTS info (id,jd,wd,formtype,fammerid,fammername,type,typename,level,levelname,scale,output,date,localurl,path,des)');
			tx.executeSql('SELECT * FROM info', [], function(tx, results) {
				var len = results.rows.length;
				if(len>0){
					document.getElementById('local').innerHTML = len+'条数据待提交'
				}
			
			}, null);
		});
		
		function checkUserAndOpenWin(html) {
			if(!localStorage.localname || localStorage.localname.length <= 0 || !localStorage.localuserid || localStorage.localuserid.length <= 0 || !localStorage.localloginname || localStorage.localloginname.length <= 0) {
				openWin('login.html')
			} else {
				openWin(html)
			}

		}
		function openDtj(){
			mui.openWindow('tableviews.html')
		}
	</script>

</html>